#coding:utf-8
'''
@Author: liu yun
@Date: 2020-06-09 13:01:42
@LastEditTime: 2020-06-17 16:06:10
@LastEditors: Please set LastEditors
@Description: In User Settings Edit
@FilePath: \common_web\web\app\__init__.py
'''
class DefaultConfig:
    DEBUG = False
    SECRET_KEY = 'this is secret string'

    # 数据库配置
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    SQLALCHEMY_RECORD_QUERIES = True
    SQLALCHEMY_DATABASE_URI =  "postgresql+psycopg2://%s:%s@%s/%s" % ('test', '1qaz@WSX', '192.168.99.100', 'test')

    # celery 配置
    CELERY_BROKER_URL = 'redis://localhost:6379/10000'
    CELERY_RESULT_BACKEND = 'redis://localhost:6379/10000'

    # catalog max depth
    CATALOG_DEEP = 3
    ERROR_LOG = "../logs/error.log"
    INFO_LOG = "../logs/info.log"


    STATIC_IMG_PATH = "img"


    TMP_PATH = "resource/tmp"
    IMAGE_PATH = "resource/image/image"

    SESSION_REDIS = {
        'host': 'localhost',
        'port': 6379,
        'db': 0,
        'encoding': 'utf-8',
        'encoding_errors': 'strict',
        'decode_responses': False
    }

    REDIS_CONFIG = {
        'host': 'localhost',
        'port': 6379,
        'db': 0,
        'encoding': 'utf-8',
        'encoding_errors': 'strict',
        'decode_responses': False
    }



